package com.itheima.day06;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Test4 {
    public static void main(String[] args) {
        List<Apple> list=new ArrayList<>();
        List<List<Apple>> lists=new ArrayList<>();

        Apple a1 = new Apple("a1hindsight", 23.5, 500);
        Apple a2 = new Apple("a2红富士", 213.7, 300);
        Apple a3 = new Apple("a3黄苹果", 34.8, 800);
        Apple a4 = new Apple("a4gong苹果", 27.9, 800);
        Collections.addAll(list,a1,a2,a3,a4);
//        System.out.println(list);
        lists.add(list);
        for (List<Apple> apples : lists) {
            for (Apple apple : apples) {
                System.out.println(apple);
            }
        }
    }
}
